<?php
namespace app\decorate\controller;
use app\ApiRest;
use app\decorate\model\Config;
use think\App;
use think\Request;
use app\decorate\model\IndexSite;
use app\decorate\model\IndexCase;


class Decorate extends ApiRest{
    protected $site_model;
    protected $case_model;
    public function __construct(&$pluginManager,App $app) {
        parent::__construct( $app);
        $this->site_model = new IndexSite();
        $this->case_model = new IndexCase();
        $pluginManager->register('decorate', $this, 'caseAndSite');
    }


    /**
     * User: chenniang
     * Date: 2019-10-28 10:39
     * @return void
     * descption:获取工地和案列
     */
    public function caseAndSite(){
        $dis[] = ['uniacid','=',$this->_uniacid];
        $data['site'] = $this->site_model->siteLimit($dis);
        $dis[] = ['recommend','=',1];
        $data['case'] = $this->case_model->caseLimit($dis);
        return $data;
    }










}
